package com.tuanzi.loan.web.lazy.collaborate;

import com.tuanzi.loan.business.service.collaborate.StatCollaborateMarketLoginService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.statistics.login.StatMarketLoginRequest;
import com.tuanzi.loan.vo.response.collaborate.StatCollaborateMarketLoginResponse;
import org.springframework.data.domain.Page;

/**
 * User: liangZongXi
 * Create time: 10:50 2019/5/9
 * Description:
 */
public class CollaborateMarketListLazyDataModel extends BaseLazyDataModel<StatMarketLoginRequest, StatCollaborateMarketLoginResponse> {
    private static final long serialVersionUID = -6008788381957534546L;

    private StatCollaborateMarketLoginService marketLoginService = SpringContextHolder.getBean(StatCollaborateMarketLoginService.class);

    public CollaborateMarketListLazyDataModel(StatMarketLoginRequest statMarketLoginRequest) {
        super(statMarketLoginRequest);
    }

    @Override
    protected Page<StatCollaborateMarketLoginResponse> doLoad(PageSearcher<StatMarketLoginRequest> pageSearcher) {
        return marketLoginService.list(pageSearcher);
    }
}
